const Key = {
	token: 'accessToken',
	user: 'userInfo',
	userName: 'userName',
	password: 'password',
	name: 'name',
	idNumber: 'idNumber',
	manageDeptId: 'manageDeptId',
	areaConfig: 'areaConfig'
}

function getUserName(){
	return uni.getStorageSync(Key.userName);
}

function setUserName(val){
	return uni.setStorageSync(Key.userName, val);
}

function clearUserName(){
	return uni.setStorageSync(Key.userName, null);
}

function getPassword(){
	return uni.getStorageSync(Key.password);
}

function setPassword(val){
	return uni.setStorageSync(Key.password, val);
}

function clearPassword(){
	return uni.setStorageSync(Key.password, null);
}

function getToken(){
	return uni.getStorageSync(Key.token);
}

function setToken(val){
	return uni.setStorageSync(Key.token, val);
}

function clearToken(){
	return uni.setStorageSync(Key.token, null);
}

function getUser(){
	return uni.getStorageSync(Key.user);
}

function setUser(val){
	return uni.setStorageSync(Key.user, val);
}

function clearUser(){
	return uni.setStorageSync(Key.user, null);
}

function getName(){
	return uni.getStorageSync(Key.name);
}

function setName(val){
	return uni.setStorageSync(Key.name, val);
}

function clearName(){
	return uni.setStorageSync(Key.name, null);
}

function getIdNumber(){
	return uni.getStorageSync(Key.idNumber);
}

function setIdNumber(val){
	return uni.setStorageSync(Key.idNumber, val);
}

function clearIdNumber(){
	return uni.setStorageSync(Key.idNumber, null);
}

function getManageDeptId(){
	return uni.getStorageSync(Key.manageDeptId);
}

function setManageDeptId(val){
	return uni.setStorageSync(Key.manageDeptId, val);
}

function getAreaConfig(){
	return uni.getStorageSync(Key.areaConfig);
}

function setAreaConfig(val){
	return uni.setStorageSync(Key.areaConfig, val);
}

export default { 
	getUserName, setUserName, clearUserName,
	getPassword, setPassword, clearPassword,
	getToken, setToken, clearToken, 
	getUser, setUser, clearUser,
	getName, setName, clearName, getIdNumber, setIdNumber, clearIdNumber,
	getManageDeptId, setManageDeptId,
	getAreaConfig, setAreaConfig
}